package com.lingyistudio.common.util;

import java.util.regex.Pattern;

/**
 * @Author :  LingYi
 * @ClassName: StringProcessing
 * @Date :   2019/7/25
 */

public class StringProcessing {
    String str = "";

    public boolean isInteger(String str){
        Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
        return pattern.matcher(str).matches();
    }
    private static Pattern NUMBER_PATTERN = Pattern.compile("[0-9]+");
    public Pattern getNumberPattern() {
        // Avoid use Pattern.compile in method body.
        Pattern localPattern = Pattern.compile("[0-9]+");
        return localPattern;
    }
}
